package com.job51.hro.exlog.config;

import com.job51.hro.exlog.box.Lion;
import com.job51.hro.exlog.box.PersonalMentionImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author pengfei.ma
 * @create 2022/10/13
 * @since 1.0.0
 */
@Configuration
@ConditionalOnClass(Lion.class)
public class MyAutoConfiguration {
    @Bean
    @ConfigurationProperties(prefix = "exlog")
    public  Lion headerLion(){
        return  new Lion();
    }

    @Bean
    @ConditionalOnMissingBean(name = "personalMentionImpl")
    public PersonalMentionImpl injectPersonalMention(){
        return new PersonalMentionImpl();
    }

}
